package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 医院导航信息表
 * @TableName hospital_navigation
 */
@TableName(value ="hospital_navigation")
@Data
public class HospitalNavigation {
    /**
     * 院区名称
     */
    @TableId
    private String hospitalArea;

    /**
     * 院区地址
     */
    private String address;

    /**
     * 联系电话1
     */
    private String phone1;

    /**
     * 联系电话2
     */
    private String phone2;

    /**
     * 公交路线
     */
    private String busRoute;

    /**
     * 操作时间
     */
    private Date operationTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HospitalNavigation other = (HospitalNavigation) that;
        return (this.getHospitalArea() == null ? other.getHospitalArea() == null : this.getHospitalArea().equals(other.getHospitalArea()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getPhone1() == null ? other.getPhone1() == null : this.getPhone1().equals(other.getPhone1()))
            && (this.getPhone2() == null ? other.getPhone2() == null : this.getPhone2().equals(other.getPhone2()))
            && (this.getBusRoute() == null ? other.getBusRoute() == null : this.getBusRoute().equals(other.getBusRoute()))
            && (this.getOperationTime() == null ? other.getOperationTime() == null : this.getOperationTime().equals(other.getOperationTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getHospitalArea() == null) ? 0 : getHospitalArea().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getPhone1() == null) ? 0 : getPhone1().hashCode());
        result = prime * result + ((getPhone2() == null) ? 0 : getPhone2().hashCode());
        result = prime * result + ((getBusRoute() == null) ? 0 : getBusRoute().hashCode());
        result = prime * result + ((getOperationTime() == null) ? 0 : getOperationTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", hospitalArea=").append(hospitalArea);
        sb.append(", address=").append(address);
        sb.append(", phone1=").append(phone1);
        sb.append(", phone2=").append(phone2);
        sb.append(", busRoute=").append(busRoute);
        sb.append(", operationTime=").append(operationTime);
        sb.append("]");
        return sb.toString();
    }
}